package com.alibaba.citrus.cr.b2b.trade.order.repository;

import com.epoch.app.bcorder.model.dto.EmployeeGetCurrentLoginResponse;
import com.epoch.app.crb2btradecenter.model.dto.RejectOrderRequest;
import com.epoch.app.crb2btradecenter.sdo.OrderSDO;

import java.util.List;

public interface OrderWriteRepository {

    String saveOrder(OrderSDO orderSDO);

    /*Boolean updateOrder(OrderSDO orderSDO);*/

    Boolean updateOrder(OrderSDO orderSDO);

    /**
     * 修改主单状态
     * @param orderSDO OrderSDO
     * @return Boolean
     */
    Boolean updateOrderStatus(OrderSDO orderSDO);

    /**
     * 修改主单状态
     */
    Boolean batchCancel(String modifierCode, String modifierName, String refuseReason, List<String> orderBizIds);


    /**
     * 拒绝订单
     * @param request RejectOrderRequest
     * @param employeeGetCurrentLoginResponse
     * @return RejectOrderResponse
     */
    Boolean rejectOrder(RejectOrderRequest request, EmployeeGetCurrentLoginResponse employeeGetCurrentLoginResponse);

    /**
     * 创建主单和子单
     * @param orderSDO orderSDO
     * @return String
     */
    String saveOrderAndOrderLine(OrderSDO orderSDO);

    /**
     * 删除订单
     * @param id ID
     * @return Boolean
     */
    Boolean deleteOrder(String id);
}
